package com.arialyy.aria.m3u8.merge;

import java.util.List;

public class MergeTS {
    private String mName;
    private String mPath;
//    private List<M3U8Seg> tsList;
    private int mIndex;

    //合成状态，成功还是失败
    private boolean mergeStatus = false;
    //能否再合成
    private boolean canAppend = true;
    //是否正在合成
    private boolean isAppending = false;

    private int appendMaxCount = 1;
    private int appendCount = 0;
    private int firstIndex = 0;
    private int lastIndex = 0;
    private int reMergeTime = 0;

    MergeTS(String name, String path,int first, int end, int index, boolean mergeStatus){
        mName = name;
        mPath = path;
//        tsList = list;
        mIndex = index;
        firstIndex = first;
        lastIndex = end;
        this.mergeStatus = mergeStatus;
    }

    public boolean isAppending() {
        return isAppending;
    }

    public void setAppending(boolean appending) {
        isAppending = appending;
    }

    public int getReMergeTime() {
        return reMergeTime;
    }

    public void setReMergeTime(int reMergeTime) {
        this.reMergeTime = reMergeTime;
    }

    public String getName() {
        return mName;
    }

    public String getPath() {
        return mPath;
    }

    public void setPath(String path) {
        this.mPath = path;
    }

    public int getFirstIndex() {
        return firstIndex;
    }

    public int getLastIndex() {
        return lastIndex;
    }

//    public void setTsList(List<M3U8Seg> tsList) {
//        firstIndex = tsList.get(0).getIndex();
//        lastIndex = tsList.get(tsList.size() - 1).getIndex();
//    }
//
//    public List<M3U8Seg> getTsList() {
//        return tsList;
//    }


    public void setFirstIndex(int firstIndex) {
        this.firstIndex = firstIndex;
    }

    public void setLastIndex(int lastIndex) {
        this.lastIndex = lastIndex;
    }

    public void setMergeStatus(boolean mergeStatus) {
        this.mergeStatus = mergeStatus;
    }

    public boolean isMergeStatus() {
        return mergeStatus;
    }

    public void setCanAppend(boolean canAppend) {
        this.canAppend = canAppend;
    }

    public boolean isCanAppend() {
        return canAppend;
    }

    public void setAppendCount(int appendCount) {
        this.appendCount = appendCount;
    }

    public int getAppendCount() {
        return appendCount;
    }
}
